package com.my.study.juc.getex;

import java.util.concurrent.Callable;

/**
 * @author: yidujun
 * @create: 2021/10/13 17:03
 */
public class ChildThread implements Callable<String> {

    @Override
    public String call() throws Exception {
        System.out.println("do something 1");
        exceptionMethod();
        System.out.println("do something 2");
        return "test result";
    }

    private void exceptionMethod() {
        throw new RuntimeException("ChildThread1 exception");
    }
}
